import React from 'react';
import {ListItemStyle} from './style'
import {Link} from 'react-router-dom'

const Item = (rowData, sectionID, rowID) => {
  return (
    <ListItemStyle key={rowID} style={{ padding: '0 15px' }}>
      <Link to={{
        pathname: "/detail/sale/"+rowData.id,
        state:rowData
      }}>
        <div className="imgs">
          <img alt="" src={rowData.img}/>
          <span>{rowData.tag}</span>
        </div>
        <div className="details_box">
          <h2>{rowData.title}</h2>
          <p className="subtitle">{rowData.subtitle}</p>
          <div className="from">
            <span className="shop">{rowData.business}</span>
            <span className="data">{rowData.date}</span>
          </div>
        </div>
      </Link>
    </ListItemStyle>
  );
}

export default Item;
